﻿<Window x:Class="WpfApp1.Views.Components.ImageWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Icon="\Resources\wb.ico"
        Title="Работа с изображением" Height="450" Width="553" Closed="Window_Closed">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="41"/>
        </Grid.RowDefinitions>

        <Image x:Name="image" Grid.Row="0" Margin="10">
            <Image.ContextMenu>
                <ContextMenu>
                    <MenuItem x:Name="menuItemCopy" Header="Копировать" Click="menuItemCopy_Click" />
                </ContextMenu>
            </Image.ContextMenu>
        </Image>
        <DockPanel Grid.Row="2" Margin="10 0 10 10">
            <Button x:Name="btnDelete" 
                    Margin="10 0"
                    Width="90" 
                    HorizontalAlignment="Left" 
                    Template="{StaticResource commonButton}" 
                    Command="{Binding ViewModel.DeleteImageCommand}"
                    CommandParameter="{Binding Image}" >Удалить</Button>
            <Button x:Name="btnClose" Margin="10 0" Width="90" HorizontalAlignment="Right" Template="{StaticResource commonButton}" Click="btnClose_Click">Закрыть</Button>
        </DockPanel>
    </Grid>
</Window>
